<div class="container">
    <form action="" method="post">
    <input type="hidden" name="user_id" value="<?=$params['user_id']?>" id="uid">
        <h1 >权限配置</h1>
        <div class="us">
            <p><label class="left" for="userName">姓名：</label><input class="inp1" name="userName" value="<?=$params['name']?>" /></p>
            <p><label class="left" for="department">事业部：</label><select style="width: 200px;" id="department" name="department"></select></p>
        </div>

        <table class="t1" id="t1"></table>

        <input type="submit" value="提交"/>
    </form>
    <div id="permission">
    <?php if(!empty($data)):?>
    <div class="permission"><label class="permissionName">已有权限：</label>
    <?php foreach($data as $bu_id=>$val):?>
    <div>
    <span id="<?=$bu_id?>" class="sp1"><?=$bu_list[$bu_id]['bu_name']?></span><div class="dd1">
    <?php foreach($val as $id=>$value):?>
    <span id="permission<?=$id?>"><input type="checkbox" id="<?=$id?>" name="permission[<?=$id?>]"><?=$value?></span>
    <?php endforeach;?>
    </div></div>
    <?php endforeach;?>
    <?php endif;?>
</div>
<?php $this->script_block_begin(); ?>
<script type="text/javascript">
var url_user = "<?php echo Portal_Urls::ajax_search_user();?>"; //搜索url
var url_role = "<?php echo Report_Urls::ajax_role_department();?>";  //部门权限
var city_list = eval('(' + '<?=json_encode($city_list)?>' + ')'); //全部城市
var bu_info = eval('(' + '<?=json_encode($bu_info)?>' + ')');    //城市下所有部门
var bu_name_list =eval('(' + '<?=json_encode($bu_list)?>' + ')');  //公司事业部
</script>
<?php $this->script_block_end(); ?>